﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ChoViet.Model;
using System.Web.Mvc;
using ChoViet.Lib.Paging;
namespace ChoViet.CMS.ViewModels
{
    public class AdIndexCMSViewModel
    {
        public IPagedList<Ad> Ads { get; set; }
        public List<Area> Areas { get; set; }
        public List<City> Cities { get; set; }
        public List<District> Districts { get; set; }
        public IList<SelectListItem> CategoryBuiltTree { get; set; }
        public Dictionary<object, object> AdForms = new Dictionary<object, object>();
        public Dictionary<object, object> PubStatus = new Dictionary<object, object>();
        public Dictionary<object, object> HOTs = new Dictionary<object, object>();
        public string Keyword { get; set;}
        public int CurentAreaId { get; set; }
        public int CurentCityId { get; set; }
        public int CurentDistrictId { get; set; }
        public int CurentCateId { get; set; }
        public int CurentAdFormId { get; set; }
        public int CurentPubStatusId { get; set; }
        public int CurentHOTId { get; set; }

    }
    public class AdEditCMSViewModel
    {
        public Ad Ad { get; set; }
        public List<City> Cities { get; set; }
        public List<District> Districts { get; set; }
        public List<Area> Areas { get; set;}
        public List<CostType> CostTypes { get; set; }
        public IList<SelectListItem> CategoryBuiltTree { get; set; }
        public List<Demand> Demands { get; set;}
        public List<Gallery> Galleries { get; set;}
        public Dictionary<object, object> MailStatus = new Dictionary<object, object>();
        //public int CurrentMailStatus { get; set; }
    }

    #region Site

    public class AdCreateViewModel
    {
        public Ad Ad { get; set; }
        public List<Country> Countries { get; set; }
        public List<Area> Areas { get; set; }
        public List<City> Cities { get; set; }
        public List<District> Districts { get; set; }
        public List<CostType> CostTypes { get; set; }
        public IList<SelectListItem> CategoryBuiltTree { get; set; }
        public List<Demand> Demands { get; set; }
        public User CurrentUser { get; set; }
        public Dictionary<object, object> CusTypes = new Dictionary<object, object>();
        public string CaptchaCode { get; set; }
    }

    public class AdTabsViewModel
    {
        public List<Ad> Ads { get; set;}
        public int CurrentCusType { get; set; }
        public Category Category { get; set;}
        public int Count { get; set; }
    }

    public class BoxHotAdsViewModel{
        public List<Ad> Ads { get; set; }
        public Category Category { get; set;}
    }

    public class BoxPromotionAdViewModel
    {
        public List<Ad> Ads { get; set; }
        public string PathTemplateContent { get; set; }
        public string PathTemplateTitle { get; set; }
    }

    public class BoxNewAdsViewModel
    {
        public List<Ad> Ads { get; set; }
        public Category Category { get; set; }
    }

    public class AdIndexViewModel
    {
        public IPagedList<Ad> Ads { get; set;}
        public Dictionary<object, object> CusTypes = new Dictionary<object, object>();
        public List<Demand> Demands { get; set; }
        public List<Country> Countries { get; set; }
        public List<Area> Areas { get; set; }
        public List<City> Cities { get; set; }
        public List<District> Districts { get; set; }
        public IList<SelectListItem> Categories { get; set; }
        public string Keyword { get; set; }
        public int CusType { get; set; }
        public Demand Demand { get; set; }
        public Country Country { get; set; } 
        public Area Area { get; set; }
        public City City { get; set; }
        public District District { get; set; }
        public Category Category { get; set; }
        public AdAttribute AdAttribute { get; set; }
        public AdAttributeValue AdAttributeValue { get; set; }
    }

    public class BoxSearchAdModel
    {
        public Dictionary<object, object> CusTypes = new Dictionary<object, object>();
        public List<Demand> Demands { get; set; }
        public List<Country> Countries { get; set; }
        public List<Area> Areas { get; set; }
        public List<City> Cities { get; set; }
        public List<District> Districts { get; set; }
        public IList<SelectListItem> Categories { get; set; }
        public string Keyword { get; set; }
        public int CurCusTypeID { get; set; }
        public int CurDemandID { get; set; }
        public int CurCountryID { get; set; }
        public int CurAreaID { get; set; }
        public int CurCityID { get; set; }
        public int CurDistrictID { get; set; }
        public int CurCategoryID { get; set; }
    }

    public class AdDetailsViewModel
    {
        public Ad Ad { get; set;}
        public List<Ad> Ads { get; set; }
        public List<Ad> AdVIPs { get; set; }
        public List<Gallery> Galleries {get;set;}
        public IPagedList<Comment> Comments { get; set; }
        public Demand Demand { get; set;}
        public int TotalAdSameUser { get; set; }
        public AdAttribute AdAttribute { get; set; }
        public AdAttributeValue AdAttributeValue { get; set; }
        public List<Tag> Tags { get; set;}
    }

    public class ListAdByUserIdViewModel
    { 
        public IPagedList<Ad> Ads {get;set;}
        public int currentPage { get; set; }
    }

    public class SubMenuViewModel
    {
        public Demand Demand { get; set; }
        public Category Category{get;set;}
        public Country Country { get; set; }
        public City City{get; set;}
    }

    public class LoadAdTheSameCateViewModel
    {
        public List<Ad> Ads { get; set;}
    }

    public class LoadListAdByTabsViewModel
    {
        public List<Ad> Ads { get; set; }
    }

    public class LoadAdByConditionViewModle
    {
        public List<Ad> Ads { get; set; }
        //public List<Sp_Ad_Select_HighestViewNumber_PerWeekResult> ListAd { get; set; }
    }

    #endregion
}
